stylecontext: Provide a function for getting the style provider
authorBenjamin Otte <otte@redhat.com>
Mon, 10 Sep 2012 10:35:46 +0000 (12:35 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 17 Sep 2012 18:39:12 +0000 (20:39 +0200)
This will be necessary for creating the computed values for keyframes.

gtk/gtkstylecontext.c
gtk/gtkstylecontextprivate.h

index 63ac1defaa982e52c787bf07b225da1b3ba335c7..69de53e898838ffabde91f59e86d932c761d2873 100644 (file)
@@ -700,6 +700,14 @@ gtk_style_context_set_cascade (GtkStyleContext *context,
     gtk_style_context_cascade_changed (cascade, context);
 }
 
+GtkStyleProviderPrivate *
+_gtk_style_context_get_style_provider (GtkStyleContext *context)
+{
+  g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), NULL);
+
+  return GTK_STYLE_PROVIDER_PRIVATE (context->priv->cascade);
+}
+
 static void
 gtk_style_context_init (GtkStyleContext *style_context)
 {
index 1c950b9147f58a94ad75db3ab684be07be6c0faa..e099478183819b21df53ca4cfac7b9bbf3d11ef7 100644 (file)
@@ -19,6 +19,7 @@
 #define __GTK_STYLE_CONTEXT_PRIVATE_H__
 
 #include "gtkstylecontext.h"
+#include "gtkstyleproviderprivate.h"
 #include "gtksymboliccolor.h"
 #include "gtkbitmaskprivate.h"
 #include "gtkcssvalueprivate.h"
@@ -57,6 +58,9 @@ void           _gtk_style_context_get_cursor_color           (GtkStyleContext
                                                               GdkRGBA            *primary_color,
                                                               GdkRGBA            *secondary_color);
 
+GtkStyleProviderPrivate *
+               _gtk_style_context_get_style_provider         (GtkStyleContext    *context);
+
 void           _gtk_style_context_stop_animations            (GtkStyleContext    *context);
 
 G_END_DECLS